Skip to content

fix(cli): renew client credentials OIDC tokens - #4389

Merged
TaylorMutch merged 3 commits into
NVIDIA:mainfrom
ericcurtin:fix/4287-oidc-client-credentials-renew/ericcurtin
Nov 10, 2026
Merged

TaylorMutch merged 3 commits into
NVIDIA:mainfrom
ericcurtin:fix/4287-oidc-client-credentials-renew/ericcurtin

Conversation

@ericcurtin

Copy link
Copy Markdown
Contributor

Summary

The CLI now renews an expired client credentials token by repeating the grant, instead of failing with no refresh token available.

Related Issue

Closes #4287

Changes

  • Mark bundles from the client credentials grant (client_credentials, absent in older files).
  • Add oidc_renew_token, used by command auth, provider commands and shell completion. It reuses oidc_client_credentials_flow.
  • Without OPENSHELL_OIDC_CLIENT_SECRET, the error names the variable. The secret is never stored.
  • Browser and device code logins still use the refresh token.
  • One docs sentence.

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

cargo test -p openshell-cli --lib oidc_auth, -p openshell-bootstrap --lib oidc_token, the OIDC integration test, cargo clippy -p openshell-cli -p openshell-bootstrap --all-targets -D warnings, cargo fmt --check. Tokens issued before this change have no marker and still need one gateway login.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Closes NVIDIA#4287

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@elezar @johntmyers PTAL when you get a chance, and /ok to test 525f184fddc6545bc4367523ed840eacd93780c1 if it looks good. Thank you!

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@ericcurtin

Copy link
Copy Markdown
Contributor Author

@elezar @johntmyers PTAL, and /ok to test 391d48f9203ba20cfcfe15711c4045200d26b213 if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@sjenning @mrunalp PTAL when you get a chance, and /ok to test 391d48f9203ba20cfcfe15711c4045200d26b213 if it looks good. Thank you!

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@ericcurtin

Copy link
Copy Markdown
Contributor Author

Merged main and fixed the conflict. @elezar @johntmyers PTAL, and /ok to test c2b7bed811fee5968e6bcf19ec71c279943052ad if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@TaylorMutch @SDAChess could you please triage #4287 so the issue check can pass? Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@pimlock @alangou PTAL when you get a chance, and could one of you triage #4287 so the issue check can pass? /ok to test c2b7bed811fee5968e6bcf19ec71c279943052ad if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@drew @krishicks PTAL when you get a chance, and could one of you triage #4287 so the issue check can pass? /ok to test c2b7bed811fee5968e6bcf19ec71c279943052ad if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@pimlock @TaylorMutch PTAL when you get a chance, and could one of you triage #4287 so the issue check can pass? /ok to test c2b7bed811fee5968e6bcf19ec71c279943052ad if it looks good. Thank you!

@TaylorMutch

Copy link
Copy Markdown
Collaborator

/ok to test c2b7bed

@TaylorMutch TaylorMutch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed client-credentials renewal across command authentication, provider commands, and shell completion.

Supplemental local CLI integration tests verified login, renewal after forced cache expiry, use of the renewed bearer token, cache persistence, and failure before mutation when the client secret is missing. Disabling client-credentials renewal made the success test fail with the original error. Existing OIDC and token-cache tests also passed. These supplemental integration tests remain local and are not included in this PR.

@TaylorMutch
TaylorMutch added this pull request to the merge queue Nov 10, 2026
Merged via the queue into NVIDIA:main with commit 9977edc Nov 10, 2026
80 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cli): client-credentials gateway login stops working when the access token expires

2 participants